﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;

namespace BIZ
{
    public class BaseClass
    {
        protected SinhNhatDBDataContext db;

        protected BaseClass()
        {
            db = new SinhNhatDBDataContext();
        }

        public SinhNhatDBDataContext DB
        {
            get
            {
                if (db.Connection.State == System.Data.ConnectionState.Closed)
                {
                    db.Connection.Open();
                }

                return db;
            }
        }
    }
}
